var t = require("../../../../mybehaviors/location/location");

Component({
    behaviors: [ t ],
    properties: {
        params: {
            type: null
        },
        data: {
            type: null
        },
        is_url: {
            type: null
        },
        search: {
            type: Boolean,
            value: !0
        },
        tag: {
            type: String,
            value: "project_verification/VerificationProjectList"
        },
        addressValue: {
            type: String,
            value: ""
        }
    },
    data: {
        address: "",
        point: {
            lat: "",
            lng: ""
        },
        city: ""
    },
    lifetimes: {
        attached: function() {},
        moved: function() {},
        detached: function() {}
    },
    attached: function() {},
    ready: function() {
        var t = this;
        this._getLocation(function(a) {
            var e = wx.getStorageSync("address-point");
            t.setData({
                address: e.city
            });
        });
    },
    pageLifetimes: {
        show: function() {},
        hide: function() {},
        resize: function() {}
    },
    methods: {
        tolocation: function() {
            wx.navigateTo({
                url: "/packageC/o2o/o2oLocation/o2oLocation?tag=" + this.data.tag
            });
        },
        tosearch: function() {
            this.data.city ? wx.navigateTo({
                url: "/packageH/project_verification/SearchProject/SearchProject"
            }) : wx.showToast({
                icon: "none",
                title: "请先选择城市",
                duration: 1e3
            });
        }
    }
});